package com.zui.entity.product;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.zui.entity.BaseAssignedIdEntity;
import com.zui.entity.setup.Uom;



@Entity
@Table(name="feature")
public class Feature extends BaseAssignedIdEntity {
	private static final long serialVersionUID = 1L;
	
	public Feature() {}
	public Feature(String id) {this.id = id;}
	
	private String name;
	private String nameEn;
	/**
	 * abbreviation
	 */
	private String abbrev;
	private FeatureType featureType;
	private FeatureCategory featureCategory;
	private Uom uom;
	/**
	 * number / quantity
	 */
	private Long numberSpecified;
	private Long defaultAmount;
	private Integer sequenceNum;

	/*------------------------------
	 * getters and annotations
	 --------------------------------*/
	@Column(length=50)
	public String getName() {return name;}
	@Column(length=50)
	public String getNameEn() {
		return nameEn;
	}
	@Column(length=20)
	public String getAbbrev() {return abbrev;}

	@ManyToOne
	@JoinColumn(name="featureTypeId")
	public FeatureType getFeatureType() {return featureType;}
	@ManyToOne
	@JoinColumn(name="featureCategoryId")
	public FeatureCategory getFeatureCategory() {return featureCategory;}
	@ManyToOne
	@JoinColumn(name="uom")
	public Uom getUom() {return uom;}
	public Long getNumberSpecified() {return numberSpecified;}
	public Long getDefaultAmount() {return defaultAmount;}
	public Integer getSequenceNum() {return sequenceNum;}
	
	
	public void setSequenceNum(Integer sequenceNum) {
		this.sequenceNum = sequenceNum;
	}
	public void setNameEn(String nameEn) {
		this.nameEn = nameEn;
	}
	public void setAbbrev(String abbrev) {
		this.abbrev = abbrev;
	}

	public void setFeatureType(FeatureType featureType) {
		this.featureType = featureType;
	}

	public void setFeatureCategory(FeatureCategory featureCategory) {
		this.featureCategory = featureCategory;
	}

	public void setUom(Uom uom) {
		this.uom = uom;
	}

	public void setNumberSpecified(Long numberSpecified) {
		this.numberSpecified = numberSpecified;
	}

	public void setDefaultAmount(Long defaultAmount) {
		this.defaultAmount = defaultAmount;
	}

	public void setName(String name) {
		this.name = name;
	}
	
}
